package days48;

import java.util.ArrayList;
import java.util.Scanner;

public class twice {

    public static void main1(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int a=scanner.nextInt();
        int b=scanner.nextInt();

    }
    public static void main2(String[] args) {
        ArrayList<StringBuilder>list=new ArrayList<>();
        Scanner scanner=new Scanner(System.in);
        String str=scanner.nextLine();
        boolean k=false;
        for (int i = 0; i < str.length(); i++) {
            StringBuilder builder=new StringBuilder();
            if(str.charAt(i)=='"'){
                k=!k;
                i++;
            }
            while ( i < str.length()&&(k||str.charAt(i)!=' ')){
                if( i < str.length()&&str.charAt(i)=='"'){
                    k=!k;
                    i++;
                }
                builder.append(str.charAt(i++));
            }
            list.add(builder);
        }
        System.out.println(list.size());
        for (StringBuilder stringBuilder:list) {
            System.out.println(stringBuilder);
        }
    }
}
